from file.models import ImageVector
from rest_framework import serializers



class ImageVectorSerializer(serializers.ModelSerializer):
    class Meta:
        model = ImageVector
        fields = '__all__'


def delete_by_knowbase_id(knowbase_id):
    delete_count,delete_details = ImageVector.objects.filter(know_base_id=knowbase_id).delete()
    return delete_count

def delete_by_file_id(file_id):
    delete_count,delete_details = ImageVector.objects.filter(file_id=file_id).delete()
    return delete_count